//$Id: examplewindow.h 705 2006-07-19 02:55:32Z jjongsma $ -*- c++ -*-

/* gtkmm example Copyright (C) 2002 gtkmm development team
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */

#ifndef GTKMM_EXAMPLEWINDOW_H
#define GTKMM_EXAMPLEWINDOW_H

#include <gtkmm.h>
#include <gconfmm.h>
#include "messageslist.h"
#include "messagetext2.h"
#include "messagetext3.h"
#include "defines.h"

class ExampleWindow : public Gtk::Window
{
	bool m_bAboutShown;
	bool m_bToolbar;
	bool m_bShowResults;
	bool m_bShowInspector;
	virtual void hide_hpane();
	Glib::RefPtr<Gnome::Conf::Client> m_client;
	 
public:
	ExampleWindow();
	virtual ~ExampleWindow();

	enum
	{
		STATUSBAR_DEFAULT,
		STATUSBAR_MENU_TIP,
		STATUSBAR_TREESELECTION
	};

protected:
	Glib::RefPtr<Gtk::UIManager> m_refUIManager;
	Glib::RefPtr<Gtk::ActionGroup> m_refActionGroup, m_refActionGroup2;
	Glib::RefPtr<Gtk::ToggleAction> m_refChoiceOne, m_refChoiceTwo;
	Glib::RefPtr<Gtk::ToggleAction> m_refOffsetHex, m_refOffsetDec;
	Glib::RefPtr<Gtk::ToggleAction> m_refToolbar;

	Gtk::Statusbar m_statusbar;
	Gtk::VPaned m_VPaned;
	Gtk::HPaned m_HPaned;
	 
	Gtk::Notebook m_Notebook;
  	MessagesList m_MessagesList;
  	MessageText2 m_MessageText;
	 
	MessageText3 m_MessageText3;
	Gtk::Label m_Label1, m_Label2;
	static Gtk::Window* m_pAbout;

	virtual void on_menu_file_new_generic();
	virtual void on_menu_file_quit();
	virtual void on_menu_others();

	virtual void on_menu_choices_one();
	virtual void on_menu_choices_two();
	virtual void on_app_about();

	virtual void on_about_close();	
	virtual void on_toggle_toolbar();
	virtual void on_toggle_datains();
	 
	virtual void on_toggle_results();	 
	void menuitem_focus_cb(const Glib::RefPtr<Gtk::Action> &action);
	Gtk::VBox m_Box;
	 
	std::vector<std::string> m_vAuth;
	void setup_statusbar_tooltip(const Glib::RefPtr<Gtk::Action>& action,
		Gtk::Widget* widget);
	 
	void about_uri_cb(Gtk::AboutDialog& dialog, const Glib::ustring& link);
	void set_paned_pos();
	void get_paned_pos();
};

#endif //GTKMM_EXAMPLEWINDOW_H
